package com.yuma.strategy;

public class AlgorithmUtilTest {
    public static void main(String[] args) {
        // 隐藏了实际算法，让使用端无感底层的多态
        AlgorithmUtil util = new AlgorithmUtil();
        System.out.println(util.encrypt(AlgorithmType.AES,"123456"));
        System.out.println(util.encrypt(AlgorithmType.DES,"123456"));
        System.out.println(util.encrypt(AlgorithmType.MD5,"123456"));
        System.out.println(util.encrypt(AlgorithmType.SHA,"123456"));
    }
}
